﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 晨曦超市管理系统.查询
{
    public partial class Remind : Form
    {
        public Remind()
        {
            InitializeComponent();
        }
        public DataTable tale;
        private void Remind_Load(object sender, EventArgs e)
        {
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string sqlstr = "select b.BillID,a.DateOfManufacture,a.ProductID,a.Name1,a.Shuliang,day(year(GETDATE())-DateOfManufacture) 天数 from CommodityList a inner join ImportBill b on a.SupplierID=b.SupplierID where  getdate()-DateOfManufacture>" + textBox1.Text.Trim() + "";
            tale = DBHelper.GetDataTable(sqlstr);
            dataGridView1.DataSource = tale;
        }
    }
}
